import http from '@/utils/http'
import { DateType, ShowType } from '@/enums/constEnums'
import { WebsiteTrafficInterfaceRes } from '@/api/websiteTraffic/types'

/**
 * @description 获取网站流量数据接口
 * @param searchParams
 */
export function getWebsiteTraffic(searchParams: {
  type: ShowType
  dateType: DateType
  dateRange: string[]
}) {
  return http.post<WebsiteTrafficInterfaceRes>(
    `/admin/websiteTraffic/dashboard/info`,
    searchParams,
  )
}
